package com.tbitsglobal.client;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.Widget;

public class TopPanel extends Composite {
	public static TopPanel instance = null;
	
	public static TopPanel get()
	{
		if(instance == null)
			instance = new TopPanel();
		return instance;
	}
	private TopPanel() {
		instance = this;
		DockPanel dp = new DockPanel();
		Button logout = new Button("Logout");
		logout.addClickListener(new ClickListener(){

			public void onClick(Widget sender) {
				// TODO Auto-generated method stub
				Talk.get().logout();
			}
			
		});
		dp.add(logout, DockPanel.EAST);
		initWidget(dp);
	}
}
